#ifndef CRANGEDENEMY_H_
#define CRANGEDENEMY_H_
#include "CEnemy.h"
#include "../Animation/CAnimation.h"
#include "../Core/IListener.h"
#include <vector>
using std::vector;

enum ERangedEnemies { ENEMY_ARCHER, FRIENDLY_ARCHER, ENEMY_CATAPULT, ENEMY_TREBUCHET };

class CRangedEnemy : public CBaseEnemy
{
private:

	unsigned int enemyType;

	vector<CAnimation> vAnimation;
	int currAnimation;
	float curVelocity;
	float attackTimer;
	float scale;
	bool bouldershot, treebucket;
	float deathTimer;

	bool readyToDie;

protected:

public:
	CRangedEnemy(unsigned int type);
	~CRangedEnemy();

	void Attack();
	void HurtMe();
	void Update( float fElapsedTime);
	void Render();
	bool Load( const char* AnimInfo);

	unsigned int GetRangedType()			{return enemyType;}
	void SetRangedType(unsigned int type)	{enemyType = type;}

	int GetCurAnimation() { return currAnimation; }
	void SetCurAnimation(int newState) { currAnimation = newState; }

	RECT GetHealthRect();

	bool CheckCollision( IBaseInterface* pBase );
	void HandleEvent(CEvent* pEvent);
};

#endif